﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Data;
using System.Web.UI.WebControls;
using Lib.Data;
using Lib.Utilities;

public partial class App_ctr_tham_so_ykien : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(!IsPostBack)
        {
            DataTable b_dt = DataSql.GetData("PBAIVIET_LKE");
           

            //Tìm bài nổi bật
            DataRow[] _row = b_dt.Select("NBAT='C'");
            if(_row.Length>0)
            {
                anh.ImageAlign = ImageAlign.Middle;
                anh.ImageUrl =LibConvert.ObjectToString(_row[0]["IMAGES"]);
                tieu_de.Text = LibConvert.ObjectToString(_row[0]["TITLE"]);
                ndung.Text = LibConvert.ObjectToString(_row[0]["TRICHDAN"]);
                b_dt.Rows.Remove(_row[0]);
                b_dt.AcceptChanges();
            }
           
            tin_moi.DataSource = b_dt;
            tin_moi.DataBind();
        }
    }
}